
clear all
set more off
global dir "C:\code"
global dir2 "C:\code\output" 


 
   
******************************************************************************
******************************** Appendix Tables  ****************************
******************************************************************************
 
 
 **** Table A.3: Spending and debt response to policy implementation****************
cd "$dir"
use Pseudodata_main.dta, clear
cd "$dir2"

foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_2_new_post treat_all_post , absorb(custid yearmth) vce(cluster city_num#card_type)
	}
esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" ) 
esttab using tableA3_panelA.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" ) 
eststo clear


foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_2_new_post treat_all_6m_post treat_all_12m_post treat_all_18m_post treat_all_24m_post  , absorb(custid yearmth) vce(cluster city_num#card_type) 
	}
esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
esttab using tableA3_panelB.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
eststo clear

 
 
****** Table A.4: Alternative MP-treatment definition ****************
foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_2_new_an_post2 treat_all_an_post2, absorb(custid yearmth) vce(cluster city_num#card_type)
	}
esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
esttab using tableA4.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
eststo clear


******* Table A.5: Treatment assignment using propensity score matching*****************

foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_post , absorb(custid yearmth) vce(cluster city_num#card_type) 
	}
esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" ) 
esttab using tableA5_panelA.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" ) 
eststo clear


foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_6m_post treat_12m_post treat_18m_post treat_24m_post  , absorb(custid yearmth) vce(cluster city_num#card_type)
	}
esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
esttab using tableA5_panelB.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
eststo clear

***********************Table A.6: Falsification test: random treatment assignment*********************************

foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_2_new_an_post3 treat_all_an_post3, absorb(custid yearmth) vce(cluster city_num#card_type)
	} 
esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
esttab using tableA6.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
eststo clear

 
 ******* Table A.7: MP Treatment categories – different minimum payment ratios ****************
foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_1_20_post treat_1_25_post treat_1_30_post , absorb(custid yearmth) vce(cluster city_num#card_type)
	}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
   esttab using tableA7.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
   eststo clear

   
 ****** Table A.8: Consumption response and descriptive statistics including full payers ************************************************************
cd "$dir"
use Pseudodata_main.dta, clear
append using Pseudodata_fullpay.dta
cd "$dir2"

foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post , absorb(custid yearmth) vce(cluster city_num#card_type) 
	}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
   esttab using tableA8_panelA.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
   eststo clear

   
foreach var in purchases_total debt_total percent_paid interest penalty {
  eststo: quietly reghdfe `var'  treat_2_new_an_post treat_all_an_0m_post treat_all_an_6m_post treat_all_an_12m_post treat_all_an_18m_post treat_all_an_24m_post , absorb(custid yearmth) vce(cluster city_num#card_type)
 	}	
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
   esttab using tableA8_panelB.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt"  "% Paid" "Interest" "Penalty" )
   eststo clear
 
 
  **** Table A.9 – Policy impact on payments at or below the minimum*****
cd "$dir"
use Pseudodata_main.dta, clear
cd "$dir2"

foreach var in P_base6m   {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post , absorb(custid yearmth) vce(cluster city_num#card_type)
  	}
  esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("P" )  
 
  foreach var in P_base6m  {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_0m_post treat_all_an_6m_post treat_all_an_12m_post treat_all_an_18m_post treat_all_an_24m_post  , absorb(custid yearmth) vce(cluster city_num#card_type) 
	}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("P" "P")  
   esttab using tableA9.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("P" "P" )  
   eststo clear
  

 **** Table A.10 Response to policy across education and income volatility categories******************
 *** Education
forvalues k=0/1 {
	display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if d_edu==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}	
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")   
   esttab using tableA10_panelA.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")  
   eststo clear

***Income Volatility
forvalues k=0/1 {
	display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if income_vol==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}	
}
	esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")   
   esttab using tableA10_panelB.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")  
   eststo clear
 
   
**** Table A.11: Discretionary vs. non-discretionary consumption *******************************
   
	foreach var in amt_discretion amt_nondiscretion  {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post , absorb(custid yearmth) vce(cluster city_num#card_type) 
	}

		foreach var in amt_discretion amt_nondiscretion  {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_0m_post treat_all_an_6m_post treat_all_an_12m_post treat_all_an_18m_post treat_all_an_24m_post  , absorb(custid yearmth) vce(cluster city_num#card_type)  
	}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Discretionary" "Non-Discretionary" "Discretionary" "Non-Discretionary" "Discretionary" "Non-Discretionary")
   esttab using tableA11_discretionary.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label  mtitles("Discretionary" "Non-Discretionary" "Discretionary" "Non-Discretionary" "Discretionary" "Non-Discretionary")
   eststo clear
  
 **** Table A.12: Response to policy based on investment account and car ownership ******************************
*Investment account
   forvalues k=0/1 {
		display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if investment==`k', absorb(custid yearmth)vce(cluster city_num#card_type)
	}
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )   
   esttab using tableA12_panelA.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )     
   eststo clear

*Car ownership
forvalues k=0/1 {
		display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if car==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" "Spending" "Debt" "Delinquent30" )   
   esttab using tableA12_panelB.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" "Spending" "Debt" "Delinquent30" )     
   eststo clear
   
   
 ****** Table A.13: Consumption response: revolvers vs. non-revolvers ******************************
foreach n in 1 3 {
	forvalues k=0/1 {
		display `k'
foreach var in  purchases_total  {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if rollover`n'==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}   
}
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending"  "Spending" "Spending" "Spending") 
   esttab using tableA13_panelA.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending"  "Spending" "Spending" "Spending") 
   eststo clear

   
foreach n in 1 3 {
	forvalues k=0/1 {
		display `k'
foreach var in  purchases_total  {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_0m_post treat_all_an_6m_post treat_all_an_12m_post treat_all_an_18m_post treat_all_an_24m_post   if rollover`n'==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}   
}
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending"  "Spending" "Spending" "Spending") 
   esttab using table13_panelB.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending"  "Spending" "Spending" "Spending") 
   eststo clear

     
 ****** Table A.14: Heterogeneity in consumption response across demographic traits ******************************
***Panel A
*** Gender
forvalues k=0/1 {
		display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if male==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )   
   esttab using tableA14_gender.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )     
   eststo clear


*** Age
forvalues k=0/1 {
display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if d_age==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}	
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")  
   esttab using tableA14_age.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")  
   eststo clear
   
      
***Panel B
*** Marital Status
forvalues k=0/1 {
		display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if married==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}	
	}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")     
   esttab using tableA14_married.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")    
   eststo clear
   

***Job Type
forvalues k=0/1 {
	display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if sector_private==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}	
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")  
   esttab using tableA14_jobtype.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30")  
   eststo clear
   

*** Panel C
forvalues k=0/1 {
		display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if personal_loan==`k', absorb(custid yearmth)
	}
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )   
   esttab using tableA14_personal_loan.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )     
   eststo clear

*** Number of cards
forvalues k=1/2 {
		display `k'
foreach var in  purchases_total debt_total delinquent30 {
  eststo: quietly reghdfe `var' treat_2_new_an_post treat_all_an_post  if n_card==`k', absorb(custid yearmth) vce(cluster city_num#card_type)
	}   
}
   esttab, b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )   
   esttab using tableA14_n_card.csv, replace b(4) se(4) ar2 star(* 0.1 ** 0.05 *** 0.01) label   mtitles("Spending" "Debt" "Delinquent30"  "Spending" "Debt" "Delinquent30" )     
   eststo clear


   
